<template>
  <div id="app">
    <h1>网页标题</h1>
    <div>
      <button @click="toPage('/home')">首页</button>
      <button @click="toPage('/about')">关于</button>
        <!-- <router-link to="/home">首页</router-link>|
        <router-link to="/about">关于</router-link> -->
    </div>
    <router-view></router-view>
    <div>底部导航</div>
  </div>
</template>

<script>

export default {
  name: 'App',
  methods:{
    toPage(path){
      this.$router.push(path)
    }
  }
}
</script>

<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
.color{
  color: red;
}
</style>
